package com.joysuch.wwyt.bp.bean.change;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * 变更记录 修改Bean对象
 */


@Data
public class BpChangeRecordListBean implements Serializable {


    @GeneratedValue(strategy = IDENTITY)
    private Long id;

    @ApiModelProperty("变更类型")
    private String changeType;

    @ApiModelProperty("变更项目")
    private String changeItem;

    @ApiModelProperty("变更项目ID")
    private Long changeItemId;

    @ApiModelProperty("变更操作")
    private String changeOperation;

    @ApiModelProperty("变更申请人")
    private Long applyUserId;

    @ApiModelProperty("变更申请人部门ID")
    private Long applyDepartId;

    @ApiModelProperty("变更申请人岗位ID")
    private Long applyJobId;

    @ApiModelProperty("变更危害识别与风险评估")
    private String riskEvalResult;

    @ApiModelProperty("变更申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date applyDate;

    @ApiModelProperty("变更内容")
    private String changeDetails;

    @ApiModelProperty("变更状态： 待审核，审核通过，审核不通过")
    private Integer state;

    @ApiModelProperty("变更申请人姓名")
    private String applyUserName;

    @ApiModelProperty("变更申请人部门名称")
    private String applyDepartName;

    @ApiModelProperty("变更申请人岗位名称")
    private String applyJobName;

    @ApiModelProperty("变更状态名称： 待审核，审核通过，审核不通过")
    private String stateName;

    @ApiModelProperty("变更审批人姓名")
    private String approveUserName;

    @ApiModelProperty("变更 审批部门名称")
    private String approveDepartName;

    @ApiModelProperty("变更 类型名称")
    private String changeTypeName;

    @ApiModelProperty("变更审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date approveDate;

    // 变更原因
    private String changeReason;
    // 变更 风险分析与控制措施
    private String riskAnalysis;


}
